package com.yy.enums;


/**
 * 文件储存目录
 * @author yy
 */
public enum InformationEnum {
	
	Others("其他", 0),
	one("one", 1),
	two("two", 2),
	three("three", 3),
	four("four", 4),
	five("five", 5),
	six("six", 6),
	seven("seven", 7),
	eight("eight", 8),
	nine("nine", 9);
	
	// 成员变量
	private String desc;
	private int code;
	

	// 构造方法
	private InformationEnum(String desc, int code) {
	    this.desc = desc;
	    this.code = code;
	}

	// 普通方法
	public static String getDesc(int code) {
	    for (InformationEnum c : InformationEnum.values()) {
		if (c.getCode() == code) {
		    return c.desc;
		}
	    }
	    return null;
	}


	public void setDesc(String desc) {
		this.desc = desc;
	}

	public int getCode() {
		return code;
	}
	public String getDesc() {
		return desc;
	}

	public void setCode(int code) {
		this.code = code;
	}
}
